Repository navigation
crypto: P-256 on BearSSL, key pairs from a raw scalar, ECDSA with RFC 6979 and low S, raw ECDH, SPKI and PKCS#8 - #13
Merged
Merged
Conversation
added 30 commits
November 20, 2026 23:28
…n BearSSL, with the family p256 and its default
…nd choice, and its pages fix the wording the review found
…d low S as two primitives, against RFC 6979 and Wycheproof
…and each Doc Comment's brief is one sentence
…r a moved-from signer and replay their seed, and its pages state what BearSSL leaves on its stack
…nate as WebCrypto's deriveBits does, against Wycheproof
… Wycheproof test requires invalid_public_key and bounds its draws, and its page cites what BearSSL's multiplication leaves on its stack
…layouts, strict, with BearSSL's encoder as their oracle
…, their constants and the Wycheproof reasons take the lint's trailing commas, and the changelog's BearSSL line stays within thirty words
…sizes and PEM around them, decode_spki passes a backend failure through, and the formats' pages read more plainly
…e keys, deriveBits with ECDH into HKDF-SHA-256, at its commit, file and lines
…signatures, ECDH and key formats
… Asciidoctor renders inside the span, and the Jamfile's comment fits its eighty columns
…g, BearSSL's DER decoder offsets its iterators by a signed difference, and OpenSSL's oracle reads keys through const pointers, as clang-tidy asks
… our PKCS#8, the public key's row names both oracles, the page says the corrupted twin disagrees, and OpenSSL's ECDSA page is a source
… without a literal ++ and the resources of std::pmr without a possessive after inline code, as the doc build's checks ask
…efore printing it, as the lint's fluent-chain rule asks, and build.jam's first comment fits its eighty columns
…aching section on signed handshakes
…d ECDH on every target, provisional, from release builds
…DH on BearSSL on every target, from the release lane sizes
…e lane's runs natively and on wasip2
… are, the BearSSL suppression says what a moved pin re-reads and why MemorySanitizer needs none, the ECDH verdict's comment names both curve implementations, and the handshake section cites WebCrypto and Trystero's low-S refusals
… webcpp branch, upstream 7bea48e with the fix to ECDSA's nonce decoding
…nd MemorySanitizer in an arm64 Linux container on 2026-11-21, the leak of the ECDSA nonce's bit length they found in upstream BearSSL and the one-commit fix webcpp's BearSSL carries
… upstream 7bea48e plus the pin 32381d6
…e changelog names curves::p256, the sodium refusal, the key pair moves enter no guard, the Wycheproof breakdown is asserted, decode_spki's errors, overview lists P-256
… a function of their own, within clang-tidy's cognitive complexity
…defaults and secp256k1 generate, into P-256
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The foundation's increment 3, P-256 on BearSSL (stream 3a, Tasks 3.1 to 3.6), for webcpp::trystero's port to Trystero 0.27.0.
curves::p256:basic_keypair(makefrom a raw scalar,generate,public_key,secret_scalar,sign_ecdsa,ecdh_x),basic_public_key(makefrom the 65-byte uncompressed point or from x and y,uncompressed),verify_ecdsa,to_der,from_der,normalize_ecdsa,check_low_s;curves/p256/formats.hpp: strictencode_spki/decode_spki,encode_pkcs8/decode_pkcs8, PEM throughpem.detail::timing_guard, nothing allocated.webcppbranch, 32381d6), and the checkers then find nothing.Verified locally on the merged heads: native clang and gcc-15, wasip2, wasip3 and Emscripten, debug and release; the tools tests; the macOS full lint; the Linux lint (changed mode); MSVC 14.3 and 14.5 (593 passed each, no new failure). CI deferred to the coordinator's final run.